\(\int (a+b \csc ^{-1}(c x)) \, dx\) [47]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 8, antiderivative size = 31 \[ \int \left (a+b \csc ^{-1}(c x)\right ) \, dx=a x+b x \csc ^{-1}(c x)+\frac {b \text {arctanh}\left (\sqrt {1-\frac {1}{c^2 x^2}}\right )}{c} \]

[Out]

a*x+b*x*arccsc(c*x)+b*arctanh((1-1/c^2/x^2)^(1/2))/c

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5323, 272, 65, 214} \[ \int \left (a+b \csc ^{-1}(c x)\right ) \, dx=a x+\frac {b \text {arctanh}\left (\sqrt {1-\frac {1}{c^2 x^2}}\right )}{c}+b x \csc ^{-1}(c x) \]

[In]

Int[a + b*ArcCsc[c*x],x]

[Out]

a*x + b*x*ArcCsc[c*x] + (b*ArcTanh[Sqrt[1 - 1/(c^2*x^2)]])/c

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 5323

Int[ArcCsc[(c_.)*(x_)], x_Symbol] :> Simp[x*ArcCsc[c*x], x] + Dist[1/c, Int[1/(x*Sqrt[1 - 1/(c^2*x^2)]), x], x
] /; FreeQ[c, x]

Rubi steps \begin{align*} \text {integral}& = a x+b \int \csc ^{-1}(c x) \, dx \\ & = a x+b x \csc ^{-1}(c x)+\frac {b \int \frac {1}{\sqrt {1-\frac {1}{c^2 x^2}} x} \, dx}{c} \\ & = a x+b x \csc ^{-1}(c x)-\frac {b \text {Subst}\left (\int \frac {1}{x \sqrt {1-\frac {x}{c^2}}} \, dx,x,\frac {1}{x^2}\right )}{2 c} \\ & = a x+b x \csc ^{-1}(c x)+(b c) \text {Subst}\left (\int \frac {1}{c^2-c^2 x^2} \, dx,x,\sqrt {1-\frac {1}{c^2 x^2}}\right ) \\ & = a x+b x \csc ^{-1}(c x)+\frac {b \text {arctanh}\left (\sqrt {1-\frac {1}{c^2 x^2}}\right )}{c} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.87 \[ \int \left (a+b \csc ^{-1}(c x)\right ) \, dx=a x+b x \csc ^{-1}(c x)+\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x \text {arctanh}\left (\frac {c x}{\sqrt {-1+c^2 x^2}}\right )}{\sqrt {-1+c^2 x^2}} \]

[In]

Integrate[a + b*ArcCsc[c*x],x]

[Out]

a*x + b*x*ArcCsc[c*x] + (b*Sqrt[1 - 1/(c^2*x^2)]*x*ArcTanh[(c*x)/Sqrt[-1 + c^2*x^2]])/Sqrt[-1 + c^2*x^2]

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.19

method result size
default \(a x +b x \,\operatorname {arccsc}\left (c x \right )+\frac {b \ln \left (c x +c x \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )}{c}\) \(37\)
parts \(a x +b x \,\operatorname {arccsc}\left (c x \right )+\frac {b \ln \left (c x +c x \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )}{c}\) \(37\)
derivativedivides \(\frac {a c x +b \left (\operatorname {arccsc}\left (c x \right ) c x +\ln \left (c x +c x \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{c}\) \(40\)

[In]

int(a+b*arccsc(c*x),x,method=_RETURNVERBOSE)

[Out]

a*x+b*x*arccsc(c*x)+b/c*ln(c*x+c*x*(1-1/c^2/x^2)^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 64 vs. \(2 (29) = 58\).

Time = 0.28 (sec) , antiderivative size = 64, normalized size of antiderivative = 2.06 \[ \int \left (a+b \csc ^{-1}(c x)\right ) \, dx=\frac {a c x - 2 \, b c \arctan \left (-c x + \sqrt {c^{2} x^{2} - 1}\right ) + {\left (b c x - b c\right )} \operatorname {arccsc}\left (c x\right ) - b \log \left (-c x + \sqrt {c^{2} x^{2} - 1}\right )}{c} \]

[In]

integrate(a+b*arccsc(c*x),x, algorithm="fricas")

[Out]

(a*c*x - 2*b*c*arctan(-c*x + sqrt(c^2*x^2 - 1)) + (b*c*x - b*c)*arccsc(c*x) - b*log(-c*x + sqrt(c^2*x^2 - 1)))
/c

Sympy [A] (verification not implemented)

Time = 1.17 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.03 \[ \int \left (a+b \csc ^{-1}(c x)\right ) \, dx=a x + b \left (x \operatorname {acsc}{\left (c x \right )} + \frac {\begin {cases} \operatorname {acosh}{\left (c x \right )} & \text {for}\: \left |{c^{2} x^{2}}\right | > 1 \\- i \operatorname {asin}{\left (c x \right )} & \text {otherwise} \end {cases}}{c}\right ) \]

[In]

integrate(a+b*acsc(c*x),x)

[Out]

a*x + b*(x*acsc(c*x) + Piecewise((acosh(c*x), Abs(c**2*x**2) > 1), (-I*asin(c*x), True))/c)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.71 \[ \int \left (a+b \csc ^{-1}(c x)\right ) \, dx=a x + \frac {{\left (2 \, c x \operatorname {arccsc}\left (c x\right ) + \log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right ) - \log \left (-\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )\right )} b}{2 \, c} \]

[In]

integrate(a+b*arccsc(c*x),x, algorithm="maxima")

[Out]

a*x + 1/2*(2*c*x*arccsc(c*x) + log(sqrt(-1/(c^2*x^2) + 1) + 1) - log(-sqrt(-1/(c^2*x^2) + 1) + 1))*b/c

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (29) = 58\).

Time = 0.28 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.00 \[ \int \left (a+b \csc ^{-1}(c x)\right ) \, dx=\frac {1}{2} \, b c {\left (\frac {2 \, x \arcsin \left (\frac {1}{c x}\right )}{c} + \frac {\log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right ) - \log \left (-\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}{c^{2}}\right )} + a x \]

[In]

integrate(a+b*arccsc(c*x),x, algorithm="giac")

[Out]

1/2*b*c*(2*x*arcsin(1/(c*x))/c + (log(sqrt(-1/(c^2*x^2) + 1) + 1) - log(-sqrt(-1/(c^2*x^2) + 1) + 1))/c^2) + a
*x

Mupad [B] (verification not implemented)

Time = 0.00 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.06 \[ \int \left (a+b \csc ^{-1}(c x)\right ) \, dx=a\,x+b\,x\,\mathrm {asin}\left (\frac {1}{c\,x}\right )+\frac {b\,\mathrm {atanh}\left (\frac {1}{\sqrt {1-\frac {1}{c^2\,x^2}}}\right )}{c} \]

[In]

int(a + b*asin(1/(c*x)),x)

[Out]

a*x + b*x*asin(1/(c*x)) + (b*atanh(1/(1 - 1/(c^2*x^2))^(1/2)))/c